From: Tim Starling Date: Sat, 25 Feb 2006 00:29:15 +0000 (+0000) Subject: If there's a duplicate, don't delete and recreate, just leave it. X-Git-Tag: 1.6.0~281 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=c9fb5e475dcf454e034f5e24beb9b6a4a755a829;p=lhc%2Fweb%2Fwiklou.git If there's a duplicate, don't delete and recreate, just leave it. --- diff --git a/includes/JobQueue.php b/includes/JobQueue.php index 265aa9c254..8874f497c5 100644 --- a/includes/JobQueue.php +++ b/includes/JobQueue.php @@ -108,7 +108,10 @@ class Job { $dbw =& wfGetDB( DB_MASTER ); if ( $this->removeDuplicates ) { - $dbw->delete( 'job', $fields, $fname ); + $res = $dbw->select( 'job', array( '1' ), $fields, $fname ); + if ( $dbw->numRows( $res ) ) { + return; + } } $fields['job_id'] = $dbw->nextSequenceValue( 'job_job_id_seq' ); $dbw->insert( 'job', $fields, $fname );